module.exports = function(grunt) {
  
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    
    
    
    uglify: {
      options: {
        // 此处定义的banner注释将插入到输出文件的顶部
        banner: '/*   @Author: <%= pkg.name %>   @Contact: <%= pkg.contact %>   @Update: <%= grunt.template.today("yyyy-mm-dd") %>   @Version: <%= pkg.version %>   */\n',
        //footer:'\n/*! <%= pkg.name %> 最后修改于： <%= grunt.template.today("yyyy-mm-dd") %> */',//添加footer
        mangle: true, //不混淆变量名
        preserveComments: 'some', //不删除注释，还可以为 false（删除全部注释），some（保留@preserve @license @cc_on等注释）
        report: "min",//输出压缩率，可选的值有 false(不输出信息)，gzip
      },
      target : {
        expand: true,
        cwd: 'js',
        src : 'lib/jstree/jstree.js',
        dest : 'js/'
      }
    }
  

  });
  
    // Load the plugin that provides the "uglify" task.
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-less');
  grunt.loadNpmTasks('grunt-contrib-imagemin');

  // Default task(s).
  grunt.registerTask('default', ['uglify']);
  
};


/*

,
    
    less: {
      compile: {
        options: {
          banner: '   @Author: <%= pkg.name %>   @Contact: <%= pkg.contact %>   @Update: <%= grunt.template.today("yyyy-mm-dd") %>   @Version: <%= pkg.version %>   \n',
          paths: ["style/"],
          compress: true,
          yuicompress: true
        },
        files: [
          {"style/css.css": "style/css.less"},
          {"style/person_css.css": "style/person_css.less"}
        ]
    }
  }

*/